{template 'common/header'}

    <div class="main">
	{if $rid!=''}
		{template 'nav'}
	{/if}
	<div class="panel panel-info">
		<div class="panel-heading">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="fm_photosvote" />
				<input type="hidden" name="do" value="rankinglist" />
				<input type="hidden" name="rid" value="{$_GPC['rid']}" />
				<button  class="btn btn-info"><i class="fa fa-search"></i>排序方式：</button>
				
				{if $_GPC['indexpx'] == -1 && empty($indexpxf)}
							<button type="submit" name="indexpxf" class="btn btn-danger" value="-1"><i class="fa fa-search"></i>最新</button>
						{else}
							<button type="submit" name="indexpx" class="btn btn-primary" value="-1"><i class="fa fa-search"></i>最新</button>
						{/if}
						
				{if $_GPC['indexpx'] == 1 && empty($indexpxf)}
							<button type="submit" name="indexpxf" class="btn btn-danger" value="1"><i class="fa fa-search"></i>人气</button>
						{else}
							<button type="submit" name="indexpx" class="btn btn-primary" value="1"><i class="fa fa-search"></i>人气</button>
						{/if}	
				{if $_GPC['indexpx'] == 2 && empty($indexpxf)}
							<button type="submit" name="indexpxf" class="btn btn-danger" value="2"><i class="fa fa-search"></i>投票数</button>
						{else}
							<button type="submit" name="indexpx" class="btn btn-primary" value="2"><i class="fa fa-search"></i>投票数</button>
						{/if}
			</form>
		
		</div>
		
	</div>

	<div class="panel panel-default">
		<div class="panel-heading">	
			<div class="row-fluid">
				<div class="span8 control-group">
					<a class="btn btn-primary" href="{php echo $this->createWebUrl('downloadph',array('rid'=>$rid, 'indexpxf' =>$_GPC['indexpxf'], 'indexpx' =>$_GPC['indexpx']))}"><i class="fa fa-download"></i> 导出排行信息
					</a>
				</div>
			</div>
		</div>
		<div class="panel panel-default">
			
			<form method="post" class="form-horizontal" id="formfans">
			<input type="hidden" name="op" value="del" />
			<div style="position:relative">
				<div class="panel-body table-responsive">
					<table class="table table-hover" style="position:relative">
					<thead class="navbar-inner">
						<tr>
							<th style="width:50px;" class="row-first row-hover">排行</th>	
							<th style="width:50px;">头像</th>	
							<th style="width:150px;">昵称</th>
							<th style="width:60px;">总票数</th>
							<th style="width:60px;">人气值</th>
							<th style="width:150px;">申报时间</th>
						</tr>
					</thead>
					<tbody>
						{php $i=1;}
						{loop $list_praise $row}
						<tr>
							<td class="row-first row-hover">{php echo $i+(($page-1)*$psize)}</td>
							<td><img src="{php echo toimage($row['avatar'])}" width="50px;"/></td>
							<td class="info">{if empty($row['realname'])}{php echo cutstr($row['nickname'], '16')}{else}{php echo cutstr($row['realname'], '16')}{/if}</td>
							<td>{php echo $row['photosnum'] + $row['xnphotosnum']}</td>
							<td>{php echo $row['hits'] + $row['xnhits']}</td>
							<td>{php echo date('Y-m-d H:i:s', $row['createtime']);}</td>
						</tr>
						{php $i++;}
						{/loop}
						
					</tbody>
					</table>
				</div>
			</div>
			</form>
			{$pager}
		</div>
    </div>
{template 'common/footer'}
